package com.ktjy.pojo;

import org.apache.log4j.lf5.util.ResourceUtils;

import java.util.Scanner;

public final class User {

    public Integer age = 18;
    private String username = "zhangsan";

    public void showAge() {
        System.out.println("年龄:" + age);
    }

    private void showName() {
        System.out.println("姓名:" + username);
    }

    public static void all() {
        System.out.println("static all");
    }

    private void show() {

    }

    public User() {
        System.out.println("无参构造方法");
    }

    private User(int age) {
        this.age = age;
        System.out.println("私有有参构造方法");
    }

    @Override
    public String toString() {
        return "User{" +
                "age=" + age +
                ", username='" + username + '\'' +
                '}';
    }
}
